Quick Start-up
This document will take you through some of the features of Flex-Able
and ensure Flex-Able's functionality on your server. If you have not yet
installed Flex-Able on your server, please refer to the installation procedures.
Note:
If you have trouble verifying the functionality of any of
the following test procedures, please ensure that Flex-Able has been
properly installed on your system and has been registered as an active plug-in
by your server software.
To use the Quickstart examples: Ensure the folder that contains this
document is somewhere in your server software's root directory (eg, you'll be
accessing the following files from your server). See the README for more
information.
- Requesting Username/Password
This
example contains one document, 'pass.able'. Pass.able will ask for the
username and password information stored in your browser. If the
information is not there, Pass.able will implement the Flex-Able tag
'<:unauthoized>', which will have your browser open the Username/Password
dialogue box. The information you enter in the box will then be stored in
your browser and used to access the page. The reload option with the query
string 'gibberish' is there to force 'request_credentials' to launch the dialogue
box even though there is username/password information already stored in the
browser.
Note: This file edits the password preferences for the virtual host contained by the root
of your server software. '.able/pass.able' is accessable by the administrator of the virtual host
it is being accessed in. Please refer to Step Five of the installation procedures
for more information.
- Counters
You will need to have entered an administrator password
(see above 'Requesting Username/Password' ) to access this file.
This example contains one
document; 'count.able'. The counter command stores the count information
for as many counts as you wish in an administration file in the
particular (virtual) host in which the pages are being counted.
'count.able' is a form that allows you to access that administration file;
you can use it to add new counts or remove counts. If you wish to simply test it,
just reload the page.
Note: This file edits the counter preferences for the virtual host contained by the root
of your server software. '.able/count.able' is accessable by the administrator of the virtual host
it is being accessed in. Please refer to Step Five of the installation procedures
for more information.
- Rotate
You will need to have entered an administrator password
(see above 'Requesting Username/Password' ) to access this file.
This example contains one document;
'rotate.able'. When placed in a document, the rotate tag cycles through a
list of sources. These sources are maintained in an administration settings
file that is stored in the root of the (virtual) host where it is being used.
There are several steps in this example, which is one of innumerable
possible implementations.
Step one: Start a new Rotate list. Type a
name in the text field, select 'new' as the action, and click 'Do It.'
Step two: Select your set in the 'Select Set' pop-up list. Then select
'Display' in the action pop-up list. Then click 'Do It.'
Step three:
Add some items to your list. These can be IMG tags, HTML tags, text, even
entire web pages. Then reload the Page to watch Flex-Able's rotate feature
cycle through your list. Note that you can have as many lists as you wish,
and that the settings files are specific to each virtual host.
Note: This file edits the rotation preferences for the virtual host contained by
the root
of your server software. '.able/rotate.able' is accessable by the administrator of the virtual host
it is being accessed in. Please refer to Step Five of the installation procedures
for more information.
- Simple Form Processing
This
example contains the files 'form.html' and 'form.able'. The page you are
accessing is 'form.html,' and the information you are requested to provide
will be processed by 'form.able'. Here, Flex-Able simply processes the
information you've provided into a dynamic HTML page which will be presented
to your browser.
- Form to File Processing
This example contains the files 'save.html' and 'save.able'. Fill out the
fields in the form and click 'save' (submit). The field data will be saved
in a file called 'comments.html.' 'save.able' has been set to save the file
'comments.html' as a unique filename; reloading and reprocessing this form
will result in the generation of multiple 'comment.html' files saved under
the names 'comment.x.html' where 'x' is the numeral representing the save
iteration of the form. A separate file containing the field information
called 'items.txt' will be generated as well. Links to these file will be
available on the response page, even the unique file name.
- Form to Mail Processing
You will need to have a
version of Net.Dreams MailAgent
installed on your server to perform Flex-Able's mail operations.
This example contains the files 'mail.html' and 'mail.able'. The file you are
accessing, 'mail.html', will request email information. When you fill
out the form, be sure to use valid email addresses. Use an email
address you can access for the field 'Recipient Email' so you can check to
see if the message has been sent.
- File
Uploading
A few notes, first: If you are
running Netscape Navigator on the same machine as your server, do not
attempt to upload files larger than a few kilobytes. Navigator does not
yield properly between buffers, causing the machine to hang. Uploading
arbitrarily large files from any other machine will work just fine.
This
example contains the files 'upload.html' and 'upload.able'. There will be a list
of checkboxes to fill out, these are just to give Flex-Able some fields to
process and report on. The two fields below are for
file information; type the name of the file you wish to upload, or click
'browse' to select a file. When you are done, click 'Upload' (submit). The
first file you selected will be uploaded to the subdirectory subdir,
with the name you've chosen for it. If the file name you've chosen exists
in subdir, the existing file will be overwritten by the uploaded file. The
second file has been uploaded- but only to get the file's information. The file
was processed by Flex-Able, but the file itself was not saved.
- URL Encoding
This example contains the files
'url.html' and 'url.able'. The url encode command translates strings into
junk suitable for use in URLs. "This silly string!" becomes
"This%20Silly%20String%2F". Complex variables such as arrays are encoded in
name-value pairs. "name1=value1&name2=value2" etc. In this example you will
be asked to type some text into a text field, and URL encode will encode it
and put it into an HTML document for you to see. URL encode is useful for
sending form data (or other data) on to a CGI or other URL-based process.
- URL Decode
This example contains the
file 'URLDecode.able'. It translates URL encoded junk back into normal text-
this is very handy for form-to-database processing.
- Substring
This example contains one
document; 'substring.able'. It returns the type of browser you are using. to
perform this task, the script makes use of the browser ENV tag- then it uses
'substring' to see if there are certain text strings contained in the
information supplied by the ENV tag. If substring finds MSIE in the
string, it will return it. Otherwise it will do another substring search; this
time for the string 'Mozilla.' If it finds Mozilla, it will return it. If
neither is found, the script will simply echo the entire browser ENV data.
- Redirecting
This example
contains one document, 'redirect.able.' Redirect.able implements the Flex-Able tag
'<:redirect>'. The URL specified in the tag is the temporary Flex-Able
home page. Loading redirect.able will send there. Please note: You must
specify a complete protocol. 'mypage.html' will not work, but
'http://www.myhome.com/mypage.html' will.
- Date and
Time
This example contains one document, 'dates.able'. Dates.able implements
the two Flex-Able commands '<:date>'
and '<:time>' to insert the
current date and time into a text stream- in this case the HTML your browser
is putting on your screen.
- String Functions: 'Omit' and 'Keep"
Keep and Omit are two functions that allow you to select groups of characters
that you want to remove from a string, or save and remove the rest of the string.
'Keep' returns a specified string with chosen characters- all the others are removed.
'Omit' returns a specified string with chosen characters removed from it.
- String Functions: Break
Break_String allows you to break a string up into smaller pieces, and inserts a chosen
character between them before returning the whole as a string. This is handy for passing
text data to database software as a delimeted file.
back to Contents /
on to Basic Syntax